#include "random.h"
#include <stdlib.h>
#include <time.h>

static int initialized = 0;

/*
 * Gets a random number value between 0 (inclusive) and max_value (exclusive).
 * int random_number(int max_value);
 * max_value: the exclusive upper-bound of the number to be returned.
 */
int random_number(int max_value)
{
	if (!initialized)
		srand(time(NULL));
	
	return rand() % max_value;
}
